-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better wording suggestions
|
||
## Peer dependencies | ||
|
||
The `stryker-karma-runner` is a pluggin for `stryker` to enable `karma` as a test runner. As such you should install the correct versions of the dependencies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stryker-karma-runner
is a plugin for stryker
to enable karma
as a test runner. As such, you should make sure you have the correct versions of it's dependencies installed:
|
||
## Warning | ||
|
||
The stryker-karma-runner is available from stryker v0.4.0 onward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stryker-karma-runner is available starting with Stryker 0.4.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove it entirely. Nobody should use stryker < 0.4 ;)
|
||
## Install | ||
|
||
Install stryker-karma-runner from your project folder: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install stryker-karma-runner locally within your project folder, like so:
|
||
## Configuring | ||
|
||
You can either configure the karma test runner from the `stryker.conf.js` file or from the command line. This readme describes how to do it via the config file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This README describes how to do use the stryker.conf.js
config file.
|
||
You can either configure the karma test runner from the `stryker.conf.js` file or from the command line. This readme describes how to do it via the config file. | ||
|
||
### Load the plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading the plugin
*Note*: Whichever testFramework you use should also be reflected in the `testFramework` property of stryker itself. For example: `testFramework: 'mocha'` | ||
|
||
Not all karma config can be overriden, as Stryker requires specific functionality from the testRunner to do its magic. | ||
Karma config that *cannot* be overriden: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following Karma config options cannot be overridden:
Not all karma config can be overriden, as Stryker requires specific functionality from the testRunner to do its magic. | ||
Karma config that *cannot* be overriden: | ||
|
||
* `files`: The karma-runner will fill this based on the `files` and `filesToMutate` configuration in the `stryker-conf.js` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
files
: Thekarma-runner
will set this option based on thefiles
andfilesToMutate
configuration in thestryker-conf.js
file.
Karma config that *cannot* be overriden: | ||
|
||
* `files`: The karma-runner will fill this based on the `files` and `filesToMutate` configuration in the `stryker-conf.js` file. | ||
* `coverageReporter`: This will be enabled for the initial test run, disabled for testing the mutants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coverageReporter
: This will be enabled for the initial test run but disabled for testing the mutants.
|
||
### Debugging | ||
|
||
By default, karma logging will be swallowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we' re running karma in it's own process, its logging output will be consumed by us.
### Debugging | ||
|
||
By default, karma logging will be swallowed. | ||
Set log level to `trace` in `stryker.conf.js` to see all the karma output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid this, set the log level to trace
in stryker.conf.js
.
|
||
```bash | ||
npm i --save-dev stryker-karma-runner | ||
``` | ||
|
||
## Peer dependencies | ||
|
||
The `stryker-karma-runner` is a pluggin for `stryker` to enable `karma` as a test runner. As such you should install the correct versions of the dependencies: | ||
The `stryker-karma-runner` is a pluggin for `stryker` to enable `karma` as a test runner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plugging -> plugin
|
||
```bash | ||
npm i --save-dev stryker-karma-runner | ||
``` | ||
|
||
## Peer dependencies | ||
|
||
The `stryker-karma-runner` is a pluggin for `stryker` to enable `karma` as a test runner. As such you should install the correct versions of the dependencies: | ||
The `stryker-karma-runner` is a pluggin for `stryker` to enable `karma` as a test runner. | ||
As such, you should make sure you have the correct versions of it's dependencies installed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its
@@ -33,24 +30,25 @@ These are marked as `peerDependencies` of `stryker-karma-runner` so you get a wa | |||
|
|||
## Configuring | |||
|
|||
You can either configure the karma test runner from the `stryker.conf.js` file or from the command line. This readme describes how to do it via the config file. | |||
You can either configure the karma test runner from the `stryker.conf.js` file or from the command line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can either configure the karma test runner using the command line or by providing a the stryker.conf.js
file.
@@ -33,24 +30,25 @@ These are marked as `peerDependencies` of `stryker-karma-runner` so you get a wa | |||
|
|||
## Configuring | |||
|
|||
You can either configure the karma test runner from the `stryker.conf.js` file or from the command line. This readme describes how to do it via the config file. | |||
You can either configure the karma test runner from the `stryker.conf.js` file or from the command line. | |||
This README describes how to do use the `stryker.conf.js` config file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This README describes how to use the stryker.conf.js
config file.
|
||
### Load the plugin | ||
|
||
In order to use the `stryker-karma-runner` it must me loaded in the stryker mutation testing framework via the stryker configuration. | ||
Easiest is to *leave out* the `plugins` section from your config entirely. That way, all node_modules starting with `stryker-` will be loaded. | ||
Easiest is to *not have a `plugins` section* from your config file. That way, all node_modules starting with `stryker-` will be loaded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The easiest way to achieve this, is not have a plugins
section in your config file. That way, all node_modules
starting with stryker-
will be loaded.
|
||
* Karma's `files` option will be used to configure the files in Stryker, you don't need to keep a list of files in sync in both `stryker.conf.js` and `karma.conf.js`. | ||
* Karma's `exclude` option will be used to ignore files in Stryker (using `!` to ignore them) | ||
* Other karma config will be copied to the `karmaConfig` option in stryker config. These will be used by the `stryker-karma-runner` during mutation testing. | ||
* Other karma config will be copied to the `karmaConfig` option in Stryker config. They will be picked up by the `stryker-karma-runner` during mutation testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- All remaining karma configs will be ...
The following Karma config options cannot be overridden: | ||
|
||
* `files`: The karma-runner will fill this based on the `files` and `mutate` configuration in the `stryker-conf.js` file (or your `karma.conf.js` file when using the *automatic setup*). | ||
* `coverageReporter`: Stryker-karma-runner will use its own coverage reporter for the initial test run and disabled it for testing the mutants. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coverageReporter
: For the initial test run, the stryker-karma-runner
will use its own coverage reporter. For testing the mutants, however, it will be disabled.
@@ -152,8 +152,9 @@ See [http://stryker-mutator.github.io](http://stryker-mutator.github.io) for mor | |||
|
|||
### Debugging | |||
|
|||
By default, karma logging will be swallowed. | |||
Set log level to `trace` in `stryker.conf.js` to see all the karma output. | |||
As Stryker runs karma in it's own process, it's logging output will be consumed Stryker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] will be consumed by Stryker.[...]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more nitpicks
I'll implement your review @philippw, thanks! |
Document how to use the new automatic setup using the
karmaConfigFile
option.